/**
 * Created by Hou on 2016/3/19.
 */
//打印采购单
app.controller('stockListController', ['$scope','ajax','$stateParams','$state',function ($scope,ajax,$stateParams,$state) {
    ajax.get({
        url:'back/stock/list',
        debug: false
    }).then(function (result) {
            console.log(result);

            var a = result;
            a.meat.length = 60;
            a.seasoning.length = 60;
            a.vegetables.length = 120;
            a.vegetables1  = a.vegetables.slice(0,30);
            a.vegetables2  = a.vegetables.slice(30,60);
            a.vegetables3  = a.vegetables.slice(60,90);
            a.vegetables4  = a.vegetables.slice(90,120);
            a.seasoning1  = a.seasoning.slice(0,30);
            a.seasoning2  = a.seasoning.slice(30,60);
            a.meat1  = a.meat.slice(0,30);
            a.meat2  = a.meat.slice(30,60);
            a.rice.length = 30;
            a.aquatic.length = 30;
            a.bean.length = 30;
            a.frozen.length = 30;
            $scope.list = a;


        })



}]);
